package com.zb.api.common.econts;


public enum LabelEnum {
    NEW_HOUSE_DECORATION(1, "新房装修"),
    SECOND_HOUSE_DECORATION(2, "二手房装修"),
    RETEST_DECORATION(3, "复试装修"),
    VILLA_DECORATION(4, "别墅装修"),
    COMMERCIAL_DECORATION(5, "商业装修"),
    LAO_RENOVATION(5, "老方翻新"),
    LIFE_INSPIRATION(5, "生活灵感"),
    CAPACITY_STORAGE(5, "扩容收纳"),
    OTHER(100, "其他")
  ;

    private String desc;
    private Integer value;

    LabelEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getValue() {
        return value;
    }


    public static LabelEnum valueOf(Integer value) {
        for (LabelEnum statusEnum : values()) {
            if (statusEnum.getValue().equals(value)) {
                return statusEnum;
            }
        }
        throw new RuntimeException("没有找到对应的枚举");
    }

    public static String value (Integer value) {
        for (LabelEnum item : LabelEnum.values()) {
            if (item.getValue().equals(value)) {
                return item.getDesc();
            }
        }
        return null;
    }
}
